import React, { Component ,Suspense} from 'react';
import { useRoutes } from 'react-router-dom';
import './App.css';
// 根路由文件地址
import routes from './router/index';

const App = () => {
  return (
    <div className='app'>
    <Suspense fallback={ <div>loading...</div> } >
      {useRoutes(routes)}
    </Suspense>
  </div>
  );
}

export default App;
